import axiosInstance from '@/api/axiosInstance'
interface bonusListParams {
  name?: string
  status?: number
  // 其他查询条件...
}
interface pageParams {
  page: number
  pageSize: number
}

// 获取奖金设置列表
export const getBonusList = async (params?: bonusListParams) => {
  return axiosInstance.get('/admin/doctor-bonus', { params })
}

// 获取奖金设置详情
export const getBonusDetail = async (id: number) => {
  return axiosInstance.get(`/admin/doctor-bonus/${id}`)
}

//获取发票列表
export const getInvoiceList = async (id: number, params?: pageParams) => {
  return axiosInstance.get(`/admin/doctor-bonus/${id}/invoice`, { params })
}

//导出奖金设置列表
export const exportBonusList = async (params?: bonusListParams) => {
  return axiosInstance.get('/admin/doctor-bonus/export', { params, responseType: 'blob', timeout: 60000 })
}
